home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group01a.txt / 000004_icon-group-sender _Fri May 12 12:35:09 2000.msg < prev    next >
Internet Message Format  |  2002-01-03  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id MAA06563
  4.     for icon-group-addresses; Fri, 12 May 2000 12:34:57 -0700 (MST)
  5. Message-Id: <200005121934.MAA06563@baskerville.CS.Arizona.EDU>
  6. From: "Frank J. Lhota" <NOSPAM.Frank.Lhota@lexma.meitech.com>
  7. X-Newsgroups: comp.lang.icon
  8. Subject: Re: Is Anyone Working On A Unicode Version Of Icon?
  9. X-Priority: 3
  10. X-MSMail-Priority: Normal
  11. X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
  12. X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
  13. Date: Fri, 12 May 2000 14:57:07 -0000
  14. X-Trace: client 958157853 38.163.203.81 (Fri, 12 May 2000 14:57:33 EDT)
  15. To: icon-group@optima.CS.Arizona.EDU
  16. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  17. Status: RO
  18. Content-Length: 1128
  19.  
  20. I would agree that it is much easier to add a new primitive type to the Java
  21. implementation of Icon, as opposed to the C implementation. In either case,
  22. however, adding a new primitive type involves coding in a language other
  23. than Icon. Ideally, it would be nice to be able to write a new type, along
  24. with its associated primitive operations, in Icon.
  25.  
  26. Currently, Icon permits one to define a new type with a record declaration,
  27. such as
  28.  
  29.     record Unicode_cset( ... )
  30.  
  31. A programmer can then define procedures for the new record type. A record
  32. type, however, fails to extend the set of primitive types, for the following
  33. reasons:
  34.  
  35. 1.    You cannot (re)define the primitive operators, such as "*", "++", or
  36. "<<", for a record type;
  37. 2.    You cannot define implicit /explicit type conversions between a record
  38. type and the existing types; and
  39. 3.    You cannot define the behaviour of functions such as image and write
  40. for the new record type.
  41.  
  42. Now imagine that we modify Icon so that we could define operators, type
  43. conversions, etc. for user-defined Icon types. Would this give us a
  44. "pluggable" capability, similar to Squeak?
  45.  
  46.  
  47.